<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title><?php echo $this->_tpl_vars['softtitle'] ?></title>
<link href="templates/css/baselist.css" rel="stylesheet" type="text/css" />
<link href="templates/css/all.css" rel="stylesheet" type="text/css" />
<link href="templates/css/clickmenu.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/control.js"></script>
<script type="text/javascript" src="js/form.js"></script>
<script type="text/javascript">

	var resizewindow= null;

	window.onresize = function(){
		var h = $(window).height();
		if(resizewindow!=h){
			sizewindow();
			resizewindow=h;
		}
	}

	function sizewindow(){
		var h = $(window).height();
		if(document.getElementById("mainbodyauto")){
			$('.manageadd').css({height:h-40});
			$('.manageedit').css({height:h-40});
		}
	}
	var setting_js_save_ok = "<?php echo $this->_tpl_vars['ST']['setting_js_save_ok'] ?>";
	var setting_js_save_no = "<?php echo $this->_tpl_vars['ST']['setting_js_save_no'] ?>";
	var iframename = "<?php echo $this->_tpl_vars['iframename'] ?>";
	$(document).ready(function(){
		var h = $(window).height();
		$('.manageadd').css({height:h-40});
		var options = {
			dataType: 'json',
			beforeSubmit: formverify,
			success:saveResponse
		}
		$('#setting<?php echo $this->_tpl_vars['groupid'] ?>').submit(function() {
			$(this).ajaxSubmit(options);
			return false;
		});
	})




	function formverify(formData) {
		parent.windowsdig('Loading','iframe:index.php?archive=management&action=load','400px','180px','iframe',false);
	}
	function saveResponse(options){
		parent.closeifram();
		var tab=document.getElementById("settingtab"+options.groupid).value;
		if (options.post=='true'){
			alert(setting_js_save_ok);
		}else{
			alert(setting_js_save_no);
		}
		if (tab=='true'){
			parent.onaletdoc()
		}
		
	}
</script>
</head>

<body>
<form name="setting<?php echo $this->_tpl_vars['groupid'] ?>" id="setting<?php echo $this->_tpl_vars['groupid'] ?>" method="post" action="index.php?archive=management&action=setsave">
	<input type="hidden" name="groupid" value="<?php echo $this->_tpl_vars['groupid'] ?>">
	<input type="hidden" name="tab" id="settingtab<?php echo $this->_tpl_vars['groupid'] ?>" value="<?php echo $this->_tpl_vars['tab'] ?>">
	<div id="mainbodyauto" class="manageadd">
		<div class="maindobycontent">
			<!--查看已选择的类型-->
			<div class="suggestion">
				<span class="sugicon"><span class="strong colorgorning2"><?php echo $this->_tpl_vars['ST']['position_title'] ?></span><span class="colorgorningage"><?php echo $this->_tpl_vars['ST']['setting_edit_mess'] ?></span></span>
			</div>
			<div class="sugtitle">
				<span class="sugtitleicon"><span class="strong colorgorning2"><?php echo $this->_tpl_vars['ST']['setting_edit_input_mess'] ?></span></span>
			</div>
			<div class="sugtitle-line"></div>
			<div class="formdiv">
				<table border="0" width="100%">
					<?php if (count($this->_tpl_vars['array'])>0){$divid_i=1;for($i=0;$i<count($this->_tpl_vars['array']); $i++){?>
					<tr class="trstyle2">
						<td width="18%" class="trtitle01"><?php echo $this->_tpl_vars['array'][$i]['content'] ?></td>
						<td width="82%" class="trtitle02">
							<?php if($this->_tpl_vars['array'][$i]['valtype']=='string'){ ?>
							<input type="text" name="<?php echo $this->_tpl_vars['array'][$i]['valname'] ?>" size="35" maxlength="250" value="<?php echo $this->_tpl_vars['array'][$i]['value'] ?>" class="infoInput"/>
							<?php } ?>
							<?php if($this->_tpl_vars['array'][$i]['valtype']=='font'){ ?>
							<input type="text" name="<?php echo $this->_tpl_vars['array'][$i]['valname'] ?>" size="10" maxlength="250" value="<?php echo $this->_tpl_vars['array'][$i]['value'] ?>" class="infoInput"/>
							<?php } ?>
							<?php if($this->_tpl_vars['array'][$i]['valtype']=='int'){ ?>
							<input type="text" name="<?php echo $this->_tpl_vars['array'][$i]['valname'] ?>" size="5" maxlength="20" value="<?php echo $this->_tpl_vars['array'][$i]['value'] ?>" class="infoInput"/>
							<?php } ?>
							<?php if($this->_tpl_vars['array'][$i]['valtype']=='bool'){ ?>
							<input type="radio" value="1" name="<?php echo $this->_tpl_vars['array'][$i]['valname'] ?>"<?php if($this->_tpl_vars['array'][$i]['value']==1){ ?> checked="checked"<?php } ?>/> <?php echo $this->_tpl_vars['array'][$i]['b1'] ?>&nbsp;
							       <input type="radio" value="0" name="<?php echo $this->_tpl_vars['array'][$i]['valname'] ?>"<?php if($this->_tpl_vars['array'][$i]['value']==0){ ?> checked="checked"<?php } ?>/> <?php echo $this->_tpl_vars['array'][$i]['b2'] ?>
							<?php } ?>
							       <!--<?php echo $this->_tpl_vars['array'][$i]['valname'] ?>-->
							<?php if(empty( $this->_tpl_vars['array'][$i]['str'] )!=fase){ ?>
							       <span class="cautiontitle"><?php echo $this->_tpl_vars['array'][$i]['str'] ?></span>
							<?php } ?>
						</td>
					</tr>
					<?php }} ?>
					<tr>
						<td colspan="2"></td>
					</tr>
				</table>
			</div>
		</div>
	</div>
	<div id="downbotton">
		<div id="subbotton">
			<table border="0" width="100%">
				<tr>
					<td id="right"><input type="submit" name="Submit" value="<?php echo $this->_tpl_vars['ST']['botton_edit'] ?>" class="buttonface" /></td>
					<td id="left" class="padding-left5"><input type="button" name="cancel" onClick="javascript:parent.onaletdoc();" value="<?php echo $this->_tpl_vars['ST']['botton_edit_reset'] ?>" class="buttonface" /></td>
				</tr>
			</table>
		</div>
	</div>
</form>
</body>

</html>